<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>双列管详情</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css"/>
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/default.css" rel="stylesheet" type="text/css"/>

    <style>
        .discell {
            text-align: right;
        }
    </style>
</head>
<body>
<div class="mini-fit">
    <div style="height:100%;width: 100%;overflow-x: auto;overflow-y: auto;">
        <form id="form1" method="post">
            <input name="mid" id="mid" class="mini-hidden" style="width: 100%" value="${id!''}" readonly/>
            <input name="pid" id="priNum" class="mini-hidden" style="width: 100%" readonly/>
            <br>
            <table align="center">
                <tr>
                    <td class="discell">申请司法所:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="shenqingname" name="shenqingname" readonly style="width: 300px"/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">申请时间:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="shenDate" name="shenDate" style="width: 300px" readonly/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">申请原因:</td>
                    <td class="input" colspan="2" >
                        <input name="shenReason" id="shenReason" class="mini-textarea" style="width: 300px;height: 50px"  readonly/>
                    </td>
                </tr>
                <tr>
                    <td style="font-weight: bold" class="discell">租房合同:</td>
                    <td>
                        <input type="button" value="下载文件" onclick="onFileUpload('zf')">
                    </td>
                </tr>
                <tr>
                    <td style="font-weight: bold" class="discell">工作合同:</td>
                    <td>
                        <input type="button" value="下载文件" onclick="onFileUpload('gz')">
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <hr/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">审批司法所:</td>
                    <td class="input" colspan="2">
                        <#--修改了名称-->
                        <#--<input property="editor" class="mini-textbox" id="villid" name="villid" readonly style="width: 300px"/>-->
                        <input property="editor" class="mini-textbox" id="approvalname" name="approvalname" readonly style="width: 300px"/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">审批时间:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="doTime" name="doTime" style="width: 300px" readonly/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">审批状态:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="shenStatef" name="shenStatef" style="width: 300px" readonly/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">审批原因:</td>
                    <td class="input" colspan="2">
                        <input class="mini-textarea" id="reason" name="reason" style="width: 300px" readonly/>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <hr/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">解除司法所:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="departnameJc" name="departnameJc" readonly style="width: 300px"/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">解除时间:</td>
                    <td class="input" colspan="2">
                        <input property="editor" class="mini-textbox" id="dateJc" name="dateJc" style="width: 300px" readonly/>
                    </td>
                </tr>
                <tr>
                    <td class="discell">解除原因:</td>
                    <td class="input" colspan="2">
                        <input class="mini-textarea" id="reasonJc" name="reasonJc" style="width: 300px" readonly/>
                    </td>
                </tr>
            </table>
        </form>
        <div style="padding:2px;margin: 0 auto;text-align: center">
            <a class="mini-button" iconCls="fa-close" plain="true" onclick="onCancel()">关闭</a>
        </div>
    </div>
</div>
<script type="text/javascript">

    mini.parse();
    var form = new mini.Form("form1");
    var mid = mini.get("mid");
    var priNum = mini.get("priNum");
    var shenqingname = mini.get("shenqingname");
    var shenDate = mini.get("shenDate");

    function setData() {
        $.ajax({
            url: "/azbjgl/slgdetails/getinfo?priNum=" + priNum.getValue() + "&id=" + mid.getValue(),
            type: "post",
            dataType: "json",
            success: function (dedata) {
                var bf = mini.decode(dedata);
                form.setData(dedata);
                form.setChanged(false);
            }
        });
    }

    function onFileUpload(e) {
        // 业务标识(2头像 3指纹 4改造表现 5心里健康 6购房合同 7租房合同 8工作合同 9其他证明材料)
        var midval = mid.getValue();
        var prival = priNum.getValue();
        var taskid = "";
        if(e == "gf"){
            taskid = "6";
        }else if(e == "zf"){
            taskid = "7";
        }else if(e == "gz"){
            taskid = "8";
        }else if(e == "qt"){
            taskid = "9";
        }
        var url = "/upload/user/uploadAppendixfile/noupload/view?1=1&id="+midval+"&priNum="+prival+"&taskId=" + taskid;
        commonEdit(url, null, null,600, 400, true,true,true);
    }

    window.onload = function () {
        form.setEnabled(false);
        priNum.setValue(${priNum!''});
        setData();
    }
</script>
</body>
</html>